<include file="Public/min-header"/>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <nav class="navbar navbar-default">
                            <div class="collapse navbar-collapse">
                                <form class="navbar-form form-inline" action="{:U('Admin/Evaluation/evaluationList')}"
                                      method="post">
                                    <div class="form-group">
                                        <input type="text" name="t_name" class="form-control" placeholder="搜索商品名称" value="{$t_name}">
                                    </div>
                                    <div class="form-group">
                                        <input type="text" name="mobile" class="form-control" placeholder="搜索手机号"value="{$mobile}">
                                    </div>
                                    <button type="submit" class="btn btn-default">搜索</button>
                                </form>
                            </div>
                        </nav>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="list-table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                                    <thead>
                                    <tr role="row">
                                        <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1"
                                            colspan="1" aria-sort="ascending"
                                            aria-label="Rendering engine: activate to sort column descending"
                                            style="width: 294px;">商品名称
                                        </th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" aria-label="Browser: activate to sort column ascending">手机号
                                        </th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" aria-label="Browser: activate to sort column ascending">回收方式
                                        </th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" aria-label="Browser: activate to sort column ascending">上门地址
                                        </th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" aria-label="Browser: activate to sort column ascending">商品回收价
                                        </th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" aria-label="Platform(s): activate to sort column ascending">商品折损价格
                                        </th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" aria-label="Platform(s): activate to sort column ascending">商品评估价格
                                        </th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" aria-label="Engine version: activate to sort column ascending">添加时间
                                        </th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" aria-label="CSS grade: activate to sort column ascending">操作
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="list" item="vo" key="k">
                                        <tr role="row" align="center">
                                            <td>{$vo.t_name}</td>
                                            <td>{$vo.mobile}</td>
                                            <td>{$vo.do_type_name}</td>
                                            <td>{$vo.shop_address}</td>
                                            <td>{$vo.goods_evaluation_money}</td>
                                            <td>{$vo.deduct_money}</td>
                                            <td>{$vo.new_money}</td>
                                            <td>{$vo.add_time}</td>
                                            <td>
                                                <a class="btn btn-primary" href="{:U('Evaluation/evaluation',array('act'=>'edit','evaluation_id'=>$vo['evaluation_id']))}"><i class="fa fa-pencil"></i></a>
                                                <a class="btn btn-danger" href="javascript:void(0)"
                                                   data-url="{:U('Evaluation/evaluationHandle')}" data-id="{$vo.evaluation_id}"
                                                   onclick="delfun(this)"><i class="fa fa-trash-o"></i></a>
                                            </td>
                                        </tr>
                                    </foreach>
                                    </tbody>
                                    <tfoot>

                                    </tfoot>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right">{$page}</div>
                        </div>
                    </div><!-- /.box-body -->
                </div><!-- /.box -->
            </div>
        </div>
    </section>
</div>
<script>
    function delfun(obj) {
        if (confirm('确认删除')) {
            $.ajax({
                type: 'post',
                url: $(obj).attr('data-url'),
                data: {act: 'del', evaluation_id: $(obj).attr('data-id')},
                dataType: 'json',
                success: function (data) {
                    if (data) {
                        $(obj).parent().parent().remove();
                        layer.msg('删除成功', {icon: 1});
                    } else {
                        layer.alert(data', {icon: 2});  //alert('删除失败');
                    }
                }
            })
        }
        return false;
    }

</script>
</body>
</html>